package com.szh.zx.gaoDingJavaBook.chapter8.one;

import java.util.stream.IntStream;

public class IntStreamTest {
	public static void main(String[] args) {
		IntStream intStream = IntStream.builder()
				.add(2)
				.add(12)
				.add(222)
				.build();
		System.out.println("is 所有元素的最大值："+intStream.max().getAsInt());
		System.out.println("is 所有元素的总和："+intStream.sum());

	}
}
